<?php
/**
 * @Author: liuhongbin
 * @Email: 514660094@qq.com
 * @Date: 2019-02-12 16:15:10
 * @Description:
 * @LastEditors: liuhongbin
 * @LastEditTime: xxx
 */

namespace hiduoke\services\formBuilder\element;

use FormBuilder\Driver\FormComponent;
use FormBuilder\Factory\Elm;

class DkTagTextarea extends FormComponent
{
    public function createValidate()
    {
        return Elm::validateStr();
    }

    /**
     * @param $data array array(['title'=>'用户名称','icon'=>'el-icon-user-solid'])
     * @return $this
     */
    public function controls($data)
    {
        $this->prop('controls', $data);
        return $this;
    }

    /**
     * 自定义控件
     * @param $data array array(['title' => '用户名', 'text' => '{user}')
     * @return $this
     */
    public function customControls($data)
    {
        $this->prop('customControls', $data);
        return $this;
    }

}
